package com.enjoyor.soa.traffic.server.tsms.dubbo.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.enjoyor.soa.traffic.api.service.dubbo.gps.PositionListener;
import com.enjoyor.soa.traffic.api.service.dubbo.gps.PositionService;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
public class DubboPositionServiceImpl {
	
	@Reference(timeout = 10000)
	private PositionService service;



	public ResultPojo addListener(List<String> var1, PositionListener var2){
		ResultPojo resultPojo = new ResultPojo();
		if(service != null) {
			resultPojo = service.addListener( var1,  var2);
		}
		return resultPojo;
	}
	
	public void removeListener(long id){
		if(service != null) {
			service.removeListener(id);
		}
	}
}
